
const cloud = require('wx-server-sdk')

cloud.init()

let db =  cloud.database()

exports.main = async (event, context) => {
    // return await db.collection('location')
    // .field({
    //     userID:event.userID
    // })
    // .get()
    return await db.collection('location')
    .where({
      data:{
        userID:event.userID
      }
    }).get()
}